package com.hnkywl.sts.dao.cwgl;

import com.hnkywl.sts.entity.cwgl.Khzhsfmx;
import net.ruixin.orm.hibernate.SimpleHibernateTemplate;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 13-3-23
 * Time: 下午1:37
 * To change this template use File | Settings | File Templates.
 */
@Repository
public class KhzhsfmxDao extends SimpleHibernateTemplate<Khzhsfmx,Long> {

    public List<Khzhsfmx> findKhzhsfmxByPj(Long pjId){
        String hql = "from Khzhsfmx where pj.id = ?";
        return (List<Khzhsfmx>)find(hql,pjId);
    }

    public List<Khzhsfmx> findKhzhsfmxByXyz(Long xyzId){
        String hql = "from Khzhsfmx where xyz.id = ?";
        return (List<Khzhsfmx>)find(hql,xyzId);
    }

    public List<Khzhsfmx> findKhzhsfmxByYhsxmx(Long yhsxmxId){
        String hql = "from Khzhsfmx where yhsxmx.id = ?";
        return (List<Khzhsfmx>)find(hql,yhsxmxId);
    }

    public List<Khzhsfmx> findKhzhsfmxByYhsx(Long yhsxId){
        String hql = "from Khzhsfmx where yhsx.id = ?";
        return (List<Khzhsfmx>)find(hql,yhsxId);
    }

    public List<Khzhsfmx> findKhzhsfmxByPjdr(Long pjId){
        String hql = "from Khzhsfmx where pjdr.id = ?";
        return (List<Khzhsfmx>)find(hql,pjId);
    }

}
